package a66weding.com.jiehuntong.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import java.util.List;

import a66weding.com.jiehuntong.R;

/**
 * Created by admin on 2016/7/25.
 */
public class NameRemarkAdapter extends MyBaseAdapter {

    public NameRemarkAdapter(Context context, List data) {
        super(context, data);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup viewGroup) {
        ViewHolder holder;
        if(convertView==null){
            convertView = View.inflate(context, R.layout.item_activity_lv,null)   ;
            holder = new ViewHolder();
            holder.tv = (TextView) convertView.findViewById(R.id.lv_tv);
            convertView.setTag(holder);
        }else{
            holder = (ViewHolder) convertView.getTag();
        }
        String name = (String) data.get(position);
        holder.tv.setText(name);
        return convertView;
    }

    class ViewHolder{
        TextView tv;
    }
}
